<!DOCTYPE html>
<html>
  <meta charset="utf-8" />
  <head>
    <title>行内样式表的设置</title>
	<style type = "text/css">
	  .container{
	    height:300px;
		width:800px;
		color:white;
		background-color:blue;
	  }
	</style>
	<script type = "text/javascript">
	   window.onload=function(){
	   	var container=document.getElementById("container");
	   	var setBgColor=document.getElementById("setBgColor");
	   	setBgColor.onclick=function(){
	   		container.style.backgroundColor="red";
	   	}
	   }
	</script>
  </head>

  <body>
    <div class ="container" id = "container">
	  some contents here!
	</div>
	<input type = "button" value = "getBgColor" id="getBgColor" />
	<input type = "button" value = "changeBgColor" id="setBgColor"/>
  </body>
</html>
